package com.zyf.chapter02.behavior.visitor.v3;

/**
 * word 文件
 * @author yifeng
 *
 */
public class WordFile extends ResourceFile {
    public WordFile(String filePath) {
        super(filePath);
    }

    @Override
    public void accept(Extractor extractor) {
        // 让 WORD 自己利用多态特性，进入到 extractor 方法
        extractor.extract2txt(this);
    }

    @Override
    public void accept(Compressor compressor) {
        compressor.compress(this);
    }
}